package com.toby.proxy;

import com.toby.service.UserService;

/**
 * @desc: 静态代理
 * @author: toby
 * @date: 2019/8/4 23:30
 */
public class StaticProxy implements UserService {

    private UserService userService;

    public StaticProxy(UserService userService){
        this.userService = userService;
    }

    @Override
    public void add() {
        System.out.println("添加日志开始");
        userService.add();
        System.out.println("添加日志结束");
    }

    @Override
    public String say(String name) {
        return "";
    }
}
